import { crtChannel } from "./crtChannel";
import { crtChannelHw } from "./crtChannelHw"
import { Loading } from "./Loading"
import { Tip } from "../scripts/TipManager";


const { ccclass, property } = cc._decorator;

@ccclass
export default class hwLogin extends cc.Component {

    login() {
        (crtChannel.getChannel() as crtChannelHw).qgLogin(async () => {
            Tip.show("登录成功");
            cc.sys.localStorage.setItem("loginSuccess", 1)

            this.node.destroy()
        }, () => {



            Tip.show("登录失败请重新登录");


        })
    }
}
